//
//  StringExtension.swift
//  foreign_swift
//
//  Created by hdr on 15-4-15.
//  Copyright (c) 2015年 hdr. All rights reserved.
//

import UIKit

extension String {
    
    func measureLength(fontSize:CGFloat = 17)->CGSize {
        let nsStr:NSString = self
        let attr = [NSFontAttributeName:UIFont.systemFontOfSize(fontSize)]
        return nsStr.sizeWithAttributes(attr)
    }
}